package com.ccrfid.rmc6.util;

public class CalcUtil {
    public static Long getCardUid(String cardIcNumber) {
        if (cardIcNumber != null && cardIcNumber.length() == 32) {
            String uidHex = "";
            for (int i = 6; i >= 0; i = i - 2) {
                uidHex += cardIcNumber.substring(i, i + 2);
            }
            return Long.parseUnsignedLong(uidHex, 16);
        } else {
            return null;
        }
    }
}